import request from '@/utils/request'

/**
 * 通用上传接口
 * @param {File} file - 文件对象
 */
export function uploadFile(file) {
  const formData = new FormData()
  formData.append('file', file)
  
  return request({
    url: '/upload/upload/single', // 完整的、通过网关的上传地址
    method: 'post',
    data: formData,
    headers: {
      'Content-Type': 'multipart/form-data'
    }
  })
} 